FROM ubuntu:latest


COPY requirements.txt /
COPY entrypoint.sh /
COPY src /server/
RUN  apt-get update && apt -y install python3 python3-pip && pip3 install -r /requirements.txt


WORKDIR /server

ENV DB_NAME "django_rest"
ENV DB_USER "dev"
ENV DB_PASSWORD "dev@123"
ENV DB_HOST "10.211.55.4"

# 指定对外开放端口
EXPOSE 8080
# 运行项目
ENTRYPOINT bash /entrypoint.sh